package com.engine4cloud.tdf.admin.api.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "行政区划-请求对象")
public class AreaQueryDTO implements Serializable {

    @Schema(description = "地区编码", example = "")
    private String code;

    @Schema(description = "父地区编码，root默认 00", example = "00")
    private String pcode;

    @Schema(description = "地区id", example = "4601012")
    private Long areaId;

    @Schema(description = "地区名称", example = "灵山")
    private String name;

    public AreaQueryDTO(String code) {
        this.code = code;
    }

    public AreaQueryDTO(String pcode, Long areaId) {
        this.pcode = pcode;
        this.areaId = areaId;
    }
}
